% \changes{v1.0}{ 9 Oct 94}{First release}
% \changes{v1.1}{ 4 Nov 94}{New options: `amigaos', `dos', `macos' and `tos';
%                           the option `ansi' is default now}
% \changes{v1.2}{28 Nov 94}{frensh characters added; options `850' and `roman8' added,
%                           `cork' removed; work's now without babel, too}
%
% \MakeShortVerb{\|}
%
% \title{The \textsf{umlaute}\thanks{The name of this package has historical
% reasons: The first versions supported only the german characters, called
% `Umlaute'} package}
% \author{Harald Axel Sommerfeldt\\Harald\_Sommerfeldt@ki.maus.de}
% \date{1994/11/28}
% \maketitle
%
% \begin{abstract}
% Different operating systems have different character sets, so many
% \LaTeX\ users use a character encoding specific style -- like
% \textsf{isolatin1}\cite[p261]{A-W:GMS94} or the one from
% Kopka\cite[D.3.6]{Kopka} for the german umlauts -- to access special characters
% directly in their documents.
% The \textsf{umlaute} package is an attempt to make a global style
% which supports many operating systems and character encoding schemes.
% It offers the portability of \LaTeX\footnote{\textsf{Note:} This package
% requires a newer version than \LaTeXe\ |<|1994/06/01|>| patch level 3.}
% documents with special characters -- they can be compiled on other
% computer systems even with different character sets with no problems.
%
% Only the german and french characters are supported yet, others will be
% implemented in future versions of this package.
% \end{abstract}
%
% \section{The user interface}
% To use this package just type
% \begin{quote}
% |\usepackage[|\textit{type}|]{umlaute}|
% \end{quote}
% in the preamble of your document,
% where \textit{type} is one of the following character encodings and
% operating systems:
% \begin{quote}
% |ansi|, |iso|, |850|, |roman8|\\
% |amigaos|, |dos|, |hpux|, |macos|, |tos| or |windows|.
% \end{quote}
% If you specify no character set, |ansi|/|iso| is used.
%
% Here is a short description of each type:
% \begin{description}
% \item[ansi {\rm or} iso]
%   the ANSI or ISO 8859-1 encoding, it is used on most UNIX systems,
%   AmigaOS and MS-Windows
% \item[850]
%   the IBM international code page 850 encoding
% \item[roman8]
%   all systems with ROMAN-8 encoding, like HP-UX
% \item[amigaos]
%   all Commodore Computers with AmigaOS, this option is the same as |iso|
% \item[dos]
%   all PC with MS-DOS (international code page 850 selected; if you only use
%   the german umlauts this style work together with the english code page 437,
%   too)
% \item[hpux]
%   all Hewlett Packard workstations with HP-UX, same as |roman8|.
%   Note that HP-UX can be forced to use the ISO-8859-1 character set (via setting
%   the environment variable |LANG|), in this case you have to use the
%   option |iso| instead of |hpux|.
% \item[macos]
%   all Apple computers with MacOS
% \item[tos]
%   all Atari ST/STE/TT/Falcon computers with (Multi-)TOS
% \item[windows]
%   all PC with MS-Windows, same as |iso|
% \end{description}
%
% If a german package like \textsf{german} or \textsf{babel} is loaded,
% a message will be typeout and the commands |"A|, |"O|, |"U|, |"a|, |"o|, |"u| and |"s|
% will be used for the german umlauts instead of |\"A|, |\"O|, |\"U|, |\"a|, |\"o|,
% |\"u| and |\"s|. You can change this behavior by selecting the option |nogerman|,
% like in the following example:
% \begin{quote}
% |\usepackage[german]{babel}|\\
% |\usepackage[hpux,nogerman]{umlaute}|
% \end{quote}
%
% \section{Notes for em\TeX\ users}
% If you are using em\TeX\, you have to make sure that you don't have
% any character translation table build into your \LaTeX\ format
% (with option |/c|). Instead, you have to use the option |/8| to allow
% 8 bit character codes in your \LaTeX\ document, so a valid command line
% to build the \LaTeXe\ format would be
% \begin{quote} |tex386 /i /8 latex.ltx|\ . \end{quote}
% If you don't follow this, this package won't work properly! You won't be able
% to compile documents with other character encodings than yours!
%
% \section{Notes for CS-\TeX\ and Multi\TeX\ users}
% CS-\TeX\ has a build-in character translation table which converts the
% Atari TOS characters to Cork encoded characters. Therefor, this package don't
% work properly with CS-\TeX !
%
% There are two different things you can do about it:
% \begin{enumerate}
% \item Use this package (with the command |\usepackage[tos]{umlaute}|)
%  only together with the DC fonts (with the command |\usepackage{t1enc}|).
%  Newertheless, you are not be able to translate \LaTeX\ documents with foreign
%  character encodings codes at all, so this solution isn't recommend!
%  It's only a bad workaround!
% \item Patch your CS-\TeX\ to get a \TeX\ with normal behaviour!
%  This is easier than you might think: just search for the hex codes
%  \begin{quote}|00 01 02 03| \ldots\ |7E 7F FC DC C2 C3| \ldots\ |BE 9E|\end{quote}
%  in the files |INITEX_L.TTP| and (|TT-|)|TEX_L.TTP|
%  and replace them with the hex codes
%  \begin{quote}|00 01 02 03| \ldots\ |7E 7F 80 81 82 83| \ldots\ |FE FF| .\end{quote}
%  The uuencoded ZIP archive |cs_patch.uue| with an already compiled patch
%  program is provided with this package.\footnote{Thanks to Markus Kohm for
%  this patch program!}
%
%  Of course, this solution is recommend.
% \end{enumerate}
%
% \section{Other \TeX\ implementations}
% If you have trouble using this package with your \TeX\ implementation
% (and maybe found a solution), please send an E-Mail to
% \begin{quote}|Harald_Sommerfeldt@ki.maus.de|\end{quote}
% or
% \begin{quote}|Harald Sommerfeldt @ KI|\qquad in the german MAUS net.\end{quote}
%
% \section{The code}
%    \begin{macrocode}
%<*package>
%    \end{macrocode}
%
% \subsection{Identification}
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{umlaute}[1994/11/28 v1.2 umlaute package (AS)]
\typeout{Package: umlaute v1.2 <1994/11/28> (Axel Sommerfeldt)}
%    \end{macrocode}
%
% \subsection{Initial code}
% \begin{macro}{\umlaute@type}
% The default input character encoding is ISO 8859-1.
%    \begin{macrocode}
\newcommand\umlaute@type{0}
%    \end{macrocode}
% \end{macro}
%
% \subsection{Declaration and execution of options}
% The options `|amiga|', `|atari|', `|ibmpc|' and `|mac|'
% are also defined for backward compatibility with v1.0 of this package.
%    \begin{macrocode}
\DeclareOption{iso}{\renewcommand\umlaute@type{0}}
\DeclareOption{ansi}{\ExecuteOptions{iso}}
\DeclareOption{850}{\renewcommand\umlaute@type{1}}
\DeclareOption{roman8}{\renewcommand\umlaute@type{2}}
\DeclareOption{amigaos}{\ExecuteOptions{iso}}
\DeclareOption{amiga}{\ExecuteOptions{amigaos}}
\DeclareOption{atari}{\ExecuteOptions{tos}}
\DeclareOption{dos}{\ExecuteOptions{850}}
\DeclareOption{ibmpc}{\ExecuteOptions{dos}}
\DeclareOption{hpux}{\ExecuteOptions{roman8}}
\DeclareOption{macos}{\renewcommand\umlaute@type{3}}
\DeclareOption{mac}{\ExecuteOptions{macos}}
\DeclareOption{tos}{\renewcommand\umlaute@type{4}}
\DeclareOption{windows}{\ExecuteOptions{ansi}}
\DeclareOption{nogerman}{\def\umlaute@nogerman{\empty}}
\ProcessOptions
%    \end{macrocode}
%
% \subsection{Main code}
% If a german package like \textsf{german} or \textsf{germanb} from \textsf{babel}
% is detected and the option |nogerman| isn't used,
% a message will be typeout and the commands |"\|\textit{x} will be used for the
% german umlauts instead of |\"|\textit{x}.
%    \begin{macrocode}
\ifx\mdqoff\undefined
  \def\umlaute@nogerman{\empty}
\fi
\ifx\umlaute@nogerman\undefined
  \typeout{\space\space\space\space\space\space\space\space\space
           german package detected}
\fi
%    \end{macrocode}
% \begin{macro}{\umlaut@german}
%    \begin{macrocode}
\newcommand{\umlaut@german}[3]{%
\ifx\umlaute@nogerman\undefined
\global\def#1{#3}
\else
\global\def#1{#2}
\fi}
%    \end{macrocode}
% \end{macro}
% Here are the different character encodings implemented.
% Only the german and frensh characters are supported now, other ones
% will be added in future releases of this package.
%    \begin{macrocode}
\ifcase\umlaute@type % iso/ansi
  \catcode`\^^ab=\active \def^^ab{<<}
  \catcode`\^^bb=\active \def^^bb{>>}
  \catcode`\^^c1=\active \def^^c1{\'A}
  \catcode`\^^c2=\active \def^^c2{\^A}
  \catcode`\^^c4=\active \umlaut@german{^^c4}{\"A}{"A}
  \catcode`\^^c7=\active \def^^c7{\c{C}}
  \catcode`\^^c8=\active \def^^c8{\`E}
  \catcode`\^^c9=\active \def^^c9{\'E}
  \catcode`\^^ca=\active \def^^ca{\^E}
  \catcode`\^^cb=\active \def^^cb{\"E}
  \catcode`\^^ce=\active \def^^ce{\^I}
  \catcode`\^^cf=\active \def^^cf{\"I}
  \catcode`\^^d4=\active \def^^d4{\^O}
  \catcode`\^^d6=\active \umlaut@german{^^d6}{\"O}{"O}
  \catcode`\^^d9=\active \def^^d9{\`U}
  \catcode`\^^db=\active \def^^db{\^U}
  \catcode`\^^dc=\active \umlaut@german{^^dc}{\"U}{"U}
  \catcode`\^^e1=\active \def^^e1{\'a}
  \catcode`\^^e2=\active \def^^e2{\^a}
  \catcode`\^^e4=\active \umlaut@german{^^e4}{\"a}{"a}
  \catcode`\^^e7=\active \def^^e7{\c{c}}
  \catcode`\^^e8=\active \def^^e8{\`e}
  \catcode`\^^e9=\active \def^^e9{\'e}
  \catcode`\^^ea=\active \def^^ea{\^e}
  \catcode`\^^eb=\active \def^^eb{\"e}
  \catcode`\^^ee=\active \def^^ee{\^\i}
  \catcode`\^^ef=\active \def^^ef{\"\i}
  \catcode`\^^f4=\active \def^^f4{\^o}
  \catcode`\^^f6=\active \umlaut@german{^^f6}{\"o}{"o}
  \catcode`\^^f9=\active \def^^f9{\`u}
  \catcode`\^^fb=\active \def^^fb{\^u}
  \catcode`\^^fc=\active \umlaut@german{^^fc}{\"u}{"u}
  \catcode`\^^df=\active \umlaut@german{^^df}{\ss}{"s}
  \typeout{\space\space\space\space\space\space\space\space\space
           ISO 8859-1 character encoding selected}
\or % 850
  \catcode`\^^ae=\active \def^^ae{<<}
  \catcode`\^^af=\active \def^^af{>>}
  \catcode`\^^b5=\active \def^^b5{\'A}
  \catcode`\^^b6=\active \def^^b6{\^A}
  \catcode`\^^8e=\active \umlaut@german{^^8e}{\"A}{"A}
  \catcode`\^^80=\active \def^^80{\c{C}}
  \catcode`\^^d4=\active \def^^d4{\`E}
  \catcode`\^^90=\active \def^^90{\'E}
  \catcode`\^^d2=\active \def^^d2{\^E}
  \catcode`\^^d3=\active \def^^d3{\"E}
  \catcode`\^^d7=\active \def^^d7{\^I}
  \catcode`\^^d8=\active \def^^d8{\"I}
  \catcode`\^^e2=\active \def^^e2{\^O}
  \catcode`\^^99=\active \umlaut@german{^^99}{\"O}{"O}
  \catcode`\^^eb=\active \def^^eb{\`U}
  \catcode`\^^ea=\active \def^^ea{\^U}
  \catcode`\^^9a=\active \umlaut@german{^^9a}{\"U}{"U}
  \catcode`\^^a0=\active \def^^a0{\'a}
  \catcode`\^^83=\active \def^^83{\^a}
  \catcode`\^^84=\active \umlaut@german{^^84}{\"a}{"a}
  \catcode`\^^87=\active \def^^87{\c{c}}
  \catcode`\^^8a=\active \def^^8a{\`e}
  \catcode`\^^82=\active \def^^82{\'e}
  \catcode`\^^88=\active \def^^88{\^e}
  \catcode`\^^89=\active \def^^89{\"e}
  \catcode`\^^8c=\active \def^^8c{\^\i}
  \catcode`\^^8b=\active \def^^8b{\"\i}
  \catcode`\^^93=\active \def^^93{\^o}
  \catcode`\^^94=\active \umlaut@german{^^94}{\"o}{"o}
  \catcode`\^^97=\active \def^^97{\`u}
  \catcode`\^^96=\active \def^^96{\^u}
  \catcode`\^^81=\active \umlaut@german{^^81}{\"u}{"u}
  \catcode`\^^e1=\active \umlaut@german{^^e1}{\ss}{"s}
  \typeout{\space\space\space\space\space\space\space\space\space
           PC-850 character encoding selected}
\or % roman8
  \catcode`\^^fb=\active \def^^fb{<<}
  \catcode`\^^fd=\active \def^^fd{>>}
  \catcode`\^^e0=\active \def^^e0{\'A}
  \catcode`\^^a2=\active \def^^a2{\^A}
  \catcode`\^^d8=\active \umlaut@german{^^d8}{\"A}{"A}
  \catcode`\^^b4=\active \def^^b4{\c{C}}
  \catcode`\^^a3=\active \def^^a3{\`E}
  \catcode`\^^dc=\active \def^^dc{\'E}
  \catcode`\^^a4=\active \def^^a4{\^E}
  \catcode`\^^a5=\active \def^^a5{\"E}
  \catcode`\^^a6=\active \def^^a6{\^I}
  \catcode`\^^a7=\active \def^^a7{\"I}
  \catcode`\^^df=\active \def^^df{\^O}
  \catcode`\^^da=\active \umlaut@german{^^da}{\"O}{"O}
  \catcode`\^^ad=\active \def^^ad{\`U}
  \catcode`\^^ae=\active \def^^ae{\^U}
  \catcode`\^^db=\active \umlaut@german{^^db}{\"U}{"U}
  \catcode`\^^c4=\active \def^^c4{\'a}
  \catcode`\^^c0=\active \def^^c0{\^a}
  \catcode`\^^cc=\active \umlaut@german{^^cc}{\"a}{"a}
  \catcode`\^^b5=\active \def^^b5{\c{c}}
  \catcode`\^^c9=\active \def^^c9{\`e}
  \catcode`\^^c5=\active \def^^c5{\'e}
  \catcode`\^^c1=\active \def^^c1{\^e}
  \catcode`\^^cd=\active \def^^cd{\"e}
  \catcode`\^^d1=\active \def^^d1{\^\i}
  \catcode`\^^dd=\active \def^^dd{\"\i}
  \catcode`\^^c2=\active \def^^c2{\^o}
  \catcode`\^^ce=\active \umlaut@german{^^ce}{\"o}{"o}
  \catcode`\^^cb=\active \def^^cb{\`u}
  \catcode`\^^c3=\active \def^^c3{\^u}
  \catcode`\^^cf=\active \umlaut@german{^^cf}{\"u}{"u}
  \catcode`\^^de=\active \umlaut@german{^^de}{\ss}{"s}
  \typeout{\space\space\space\space\space\space\space\space\space
           Roman-8 character encoding selected}
\or % MacOS
  \catcode`\^^c7=\active \def^^c7{<<}
  \catcode`\^^c8=\active \def^^c8{>>}
  \catcode`\^^cb=\active \def^^cb{\'A}
  \catcode`\^^e5=\active \def^^e5{\^A}
  \catcode`\^^80=\active \umlaut@german{^^80}{\"A}{"A}
  \catcode`\^^82=\active \def^^82{\c{C}}
  \catcode`\^^e9=\active \def^^e9{\`E}
  \catcode`\^^83=\active \def^^83{\'E}
  \catcode`\^^e6=\active \def^^e6{\^E}
  \catcode`\^^e8=\active \def^^e8{\"E}
  \catcode`\^^eb=\active \def^^eb{\^I}
  \catcode`\^^ec=\active \def^^ec{\"I}
  \catcode`\^^ef=\active \def^^ef{\^O}
  \catcode`\^^85=\active \umlaut@german{^^85}{\"O}{"O}
  \catcode`\^^f4=\active \def^^f4{\`U}
  \catcode`\^^f3=\active \def^^f3{\^U}
  \catcode`\^^86=\active \umlaut@german{^^86}{\"U}{"U}
  \catcode`\^^88=\active \def^^88{\'a}
  \catcode`\^^89=\active \def^^89{\^a}
  \catcode`\^^8a=\active \umlaut@german{^^8a}{\"a}{"a}
  \catcode`\^^8d=\active \def^^8d{\c{c}}
  \catcode`\^^8f=\active \def^^8f{\`e}
  \catcode`\^^8e=\active \def^^8e{\'e}
  \catcode`\^^90=\active \def^^90{\^e}
  \catcode`\^^91=\active \def^^91{\"e}
  \catcode`\^^94=\active \def^^94{\^\i}
  \catcode`\^^95=\active \def^^95{\"\i}
  \catcode`\^^99=\active \def^^99{\^o}
  \catcode`\^^9a=\active \umlaut@german{^^9a}{\"o}{"o}
  \catcode`\^^9d=\active \def^^9d{\`u}
  \catcode`\^^9e=\active \def^^9e{\^u}
  \catcode`\^^9f=\active \umlaut@german{^^9f}{\"u}{"u}
  \catcode`\^^a7=\active \umlaut@german{^^a7}{\ss}{"s}
  \typeout{\space\space\space\space\space\space\space\space\space
           Apple MacOS character encoding selected}
\or % Atari TOS
  \catcode`\^^ae=\active \def^^ae{<<}
  \catcode`\^^af=\active \def^^af{>>}
  % no \'A and \^A
  \catcode`\^^8e=\active \umlaut@german{^^8e}{\"A}{"A}
  \catcode`\^^80=\active \def^^80{\c{C}}
  % no \`E
  \catcode`\^^90=\active \def^^90{\'E}
  % no \^E and \"E
  % no \^I and \"I
  % no \^O
  \catcode`\^^99=\active \umlaut@german{^^99}{\"O}{"O}
  % no \`U and \^U
  \catcode`\^^9a=\active \umlaut@german{^^9a}{\"U}{"U}
  \catcode`\^^a0=\active \def^^a0{\'a}
  \catcode`\^^83=\active \def^^83{\^a}
  \catcode`\^^84=\active \umlaut@german{^^84}{\"a}{"a}
  \catcode`\^^87=\active \def^^87{\c{c}}
  \catcode`\^^8a=\active \def^^8a{\`e}
  \catcode`\^^82=\active \def^^82{\'e}
  \catcode`\^^88=\active \def^^88{\^e}
  \catcode`\^^89=\active \def^^89{\"e}
  \catcode`\^^8c=\active \def^^8c{\^\i}
  \catcode`\^^8b=\active \def^^8b{\"\i}
  \catcode`\^^93=\active \def^^93{\^o}
  \catcode`\^^94=\active \umlaut@german{^^94}{\"o}{"o}
  \catcode`\^^97=\active \def^^97{\`u}
  \catcode`\^^96=\active \def^^96{\^u}
  \catcode`\^^81=\active \umlaut@german{^^81}{\"u}{"u}
  \catcode`\^^9e=\active \umlaut@german{^^9e}{\ss}{"s}
  \typeout{\space\space\space\space\space\space\space\space\space
           Atari TOS character encoding selected}
\fi
%</package>
%    \end{macrocode}
%
% \iffalse
% \subsection{The `|umlaute|' package}
% This file is for backward compatibility with versions 1.x of this package only.
%    \begin{macrocode}
%<*umlaute>
\NeedsTeXFormat{LaTeX2e}
%\@obsoletefile{charenc.sty}{umlaute.sty}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{charenc}}
\ProcessOptions
\RequirePackage{charenc}
%</umlaute>
%    \end{macrocode}
% \fi
%
% \iffalse
% \subsection{The driver file}
%    \begin{macrocode}
%<*driver>
\documentclass{article}
\usepackage{doc}
\CodelineNumbered
\RecordChanges
\setlength{\parindent}{0pt}
\begin{document}
  \DocInput{umlaute.dtx} \PrintChanges
\end{document}
%</driver>
%    \end{macrocode}
% \fi
%
% \begin{thebibliography}{9}
% \bibitem{A-W:GMS94}
% Michel Goossens, Frank Mittelbach and Alexander Samarin:
% \newblock {\em The {\LaTeX} Companion},
% \newblock Addison-Wesley, Reading, Massachusetts, 1994.
% \bibitem{Kopka}
% Helmut Kopka: \emph{\LaTeX -- Eine Einf\"uhrung},
% 4. \"uberarbeitete und erweiterte Auf\/lage, Addison-Wesley, Bonn, 1992
% \end{thebibliography}
%
% \Finale
%
\endinput
